@extends('layouts.default')
@section('content')
@include('modules.thanhmenu')
<br/>
<?php
if(HomeController::checkInTime('tkkqlv')){

$tbmthongke = new tbmthongke();
$hocki_namhoc =$tbmthongke->HocKiHienTai();
$resource=$tbmthongke ->DsKetQuaTHLV(Session::get('infor.idbm')[0]);
foreach ($hocki_namhoc as $key ) {
    $namhoc=$key->nien_khoa;
    $hocki=$key->hoc_ky;}
?>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
                <tr>
                    <td align="center" colspan="5" class="cm_footer btop brt" style="color:#fff; font-size: 14px; font-weight: bold">
                        Kết Quả Luận Văn Năm <?= $namhoc ?> Học Kỳ : <?= $hocki ?>
                    </td>
                </tr>
                <tr>
                    <td width="10%" align="center" colspan="1" class="title-danhsachhp blt btop bbot" style="padding: 5px">
                        STT
                    </td>
                    <td width="15%"align="center" colspan="1" class="title-danhsachhp blt btop bbot" style="padding: 5px">
                        Mssv
                    </td>
                    <td width="20%"align="center" colspan="1" class="title-danhsachhp blt btop bbot" style="padding: 5px">
                        Họ Tên
                    </td>
                    <td width="45%" align="center" colspan="1" class="title-danhsachhp  blt btop brt bbot" style="padding: 5px">
                        Tên Dề Tài
                    </td>
                    <td width="10%" align="center" colspan="1" class="title-danhsachhp  blt btop brt bbot" style="padding: 5px">
                        Điểm Chữ
                    </td>
                </tr> 
                <?php 
                $stt=0;
                foreach ($resource as $key ) {
                ?>
                <tr <?php if ($stt % 2!= 0) echo "style='background:#ccc'" ?> align="center">
                        <td class="blt bbot brt"  style='padding: 5px'>
                            <?= ++$stt ?>
                        </td>

                        <td class="bbot brt"  style='padding: 5px'>
                            <?= $key->mssv ?>
                        </td>
                        <td class="bbot brt"  style='padding: 5px'>
                            <?= $key->ho ?>
                            <?= $key->ten ?>
                        </td>
                        <td class="bbot brt"  style='padding: 5px'>
                            <?= $key->ten_de_tai ?>
                        </td>
                         <td class="bbot brt"  style='padding: 5px'>
                            <?= $key->diem_chu?>
                        </td>  
                    </tr>
                <?php
                }
                ?>
                <tr><td><br/></td></tr>
                <tr><td colspan='5' align='right'><img class='exampleDiv' name='In' title='In Danh Sách' src="<?= URL ?>public/images/print.png" onclick="PopUp('<?=URL?>tbm/8/indskq')"/><br/><br/></td></tr>
                
 </table>
<?php
}
 else {
   echo "<script>alert('Chưa đến thời gian thống kê danh sách điểm sinh viên thực hiện luận văn!');</script>";    
}
?>
@stop

